package com.xyz.service;

import com.xyz.dto.EquipmentDto;
import com.xyz.dto.EquipmentElectricalDto;
import com.xyz.entity.pojo.EquipmentTree;
import com.xyz.util.dto.DataResult;
import com.xyz.util.dto.LoginInfo;

public interface EquipmentService {

    // 设备树
    DataResult selectEquipmentTree(LoginInfo li) throws Exception;

    DataResult selectEquipmentTreeGroup(LoginInfo li, long id) throws Exception;

    DataResult selectEquipmentTreeGroupNoEquipment(LoginInfo li, long id) throws Exception;

    DataResult updateEquipmentTreeGroup(LoginInfo li, int type, long id, long baseTreeId) throws Exception;

    DataResult insertEquipmentTreeGroupInfo(LoginInfo li, long baseId, String name, String code, int emType) throws Exception;

    DataResult updateEquipmentTreeGroupInfo(LoginInfo li, long id, String name, String code, int emType) throws Exception;

    DataResult deleteEquipmentTreeGroupInfo(LoginInfo li, long id) throws Exception;

    // 设备
    DataResult selectEquipment(LoginInfo li, int pageNum, int pageSize, String subsystemId, String emGrade, String emState, String subTreeId,String emName) throws Exception;

    DataResult selectEquipmentInfo(LoginInfo li, long id) throws Exception;

    DataResult insertEquipmentInfo(LoginInfo li, EquipmentDto dto) throws Exception;

    DataResult updateEquipmentInfo(LoginInfo li, EquipmentDto dto) throws Exception;

    DataResult updateEquipmentInfoOfScrap(LoginInfo li, long id) throws Exception;

    DataResult deleteEquipmentInfo(LoginInfo li, long id) throws Exception;

    // 设备描述
    DataResult selectEquipmentData(LoginInfo li, long id) throws Exception;

    DataResult updateEquipmentData(LoginInfo li, long id, String emDesc, String emFileCodes) throws Exception;

    // 设备文档
    DataResult selectEquipmentDocument(LoginInfo li, int pageNum, int pageSize, long id, int type) throws Exception;

    DataResult insertEquipmentDocument(LoginInfo li, long id, int type, String fileCodes) throws Exception;

    DataResult deleteEquipmentDocument(LoginInfo li, long id) throws Exception;

    // 历史
    DataResult selectEquipmentOperationLog(LoginInfo li, int pageNum, int pageSize, long id) throws Exception;

    // 移动
    DataResult selectEquipmentMoveLog(LoginInfo li, int pageNum, int pageSize, long id) throws Exception;

    // 设备PLC阈值
    DataResult selectEquipmentPlc(LoginInfo li, long id) throws Exception;

    DataResult insertEquipmentPlc(LoginInfo li, long emId, int type, String unit, String upperLimit, String lowerLimit) throws Exception;

    DataResult updateEquipmentPlc(LoginInfo li, long id, int type, String unit, String upperLimit, String lowerLimit) throws Exception;

    DataResult deleteEquipmentPlc(LoginInfo li, long id) throws Exception;

    // 维保、巡检记录
    DataResult selectEquipmentUpkeep(LoginInfo li, int pageNum, int pageSize, long id) throws Exception;

    DataResult selectEquipmentPatrol(LoginInfo li, int pageNum, int pageSize, long id) throws Exception;

    DataResult selectEquipmentPatrolByEmId(LoginInfo li, int pageNum, int pageSize, long id) throws Exception;


    // 辅助信息
    DataResult selectEquipmentAuxiliary(LoginInfo li, long id) throws Exception;

    DataResult insertEquipmentAuxiliary(LoginInfo li, long id, String fileCode) throws Exception;

    //维保计划配置树
    DataResult selectEquipmentTreeUpkeep(LoginInfo li, long id) throws Exception;

    //查询电器元件列表
    DataResult selectEquipmentElectrical(LoginInfo li, long id) throws Exception;

    //新增电器元件列表
    DataResult insertEquipmentElectrical(LoginInfo li, EquipmentElectricalDto equipmentElectricalDto) throws Exception;

    //编辑电器元件列表
    DataResult updateEquipmentElectrical(LoginInfo li, EquipmentElectricalDto equipmentElectricalDto) throws Exception;

    //删除
    DataResult deleteEquipmentElectrical(LoginInfo li, long id);

    String regionName(long id);

    /**
     * 移动端查询设备详情
     * @param id 设备id
     * @return
     */
    DataResult selectDetails(Long id);
}
